// "build": "vue-cli-service build --target lib --name wjc-easy-element-ui --dest dist lib/index.js"
const path = require('path');

function resolve(dir = '') {
  return path.join(__dirname, dir)
}

module.exports = {
  // assetsDir: './example',
  lintOnSave: false,
  pages: {
    index: {
      entry: './lib/index.js',
      output: {
        path: path.resolve(__dirname, 'dist'),
        libraryExport: 'default'
        // filename: 'wjc-easy-element-ui.umd.min.js',
      },
      template: './public/index.html'
    }
  },
  // devServer: {
  //   static: {
  //     directory: path.join(__dirname, 'example'),
  //   },
  //   port: 9020,
  //   open: true,
  // },
  configureWebpack: {
    resolve: {
      extensions: ['.js', '.vue', '.json'],
      alias: {
        '@lib': resolve('./lib')
      }
    },
  },
  productionSourceMap: false,
  css: {
    extract: false,
  },
}
